home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
NEW_TECH
/
LS351W.ZIP
/
LSORTNT.HLP
< prev
next >
Wrap
Text File
|
1994-02-02
|
11KB
|
237 lines
LSORTNT 3.51 (C) Copyright London Computing, 1983-1993.
All rights reserved.
LSORTNT is a general purpose sort/merge utility written in Visual C++
for Microsoft Windows NT 3.1. It runs on IBM PCs and compatibles.
LSORTNT is User Supported Software, if this program proves useful, please
make a contribution ($35 suggested) to:
London Computing, P.O. Box 696 Cherry Hill, NJ 08003
Anyone sending a contribution will receive a disk containing the source code
to LSORTNT as well as a copy of the LSRT sort filter. LSRT is similar to the
DOS SORT filter but works much faster and will sort on multiple fields.
You may make copies of this software and distribute to other users as long as
there is no charge or other consideration and this notice is not removed or
bypassed.
LSORTNT will sort Windows NT, MSDOS, OS2 files and dBase II and dBase III
databases. (dBase III memo files and FOXPRO memo files are not sorted
but .DBF files will be sorted.) Each file may be sorted using 1 to 32
sort fields. The file to be sorted may contain either fixed length
records, variable length records or comma delimited records. Variable
length records are records ending with cr/lf. Comma delimited records
are variable length records where the fields are also variable length
and separated by a comma. Character fields may be enclosed in either
single or double quotes. It will merge up to 5 files using 1 to 32
sort fields. dBase databases may not be merged. Any field may be
sorted in either ascending or descending sequence. LSORTNT allows for
three user defined field types to be used: X,Y and Z. You must write
your own comparison subroutine to compare user defined fields.
The sort knows about: field type
binary fields (to 127 bytes) B
Binary Fields are sorted from left to right
one byte at a time based on the code in each
position (0-255). Useful for comparing
IBM Mainframe style binary numbers.
packed decimal fields (1-8 bytes) Stored as on P
IBM Mainframe computers. Each digit position
is stored in 4 bits as a binary value between
0 and 10. The digits are stored left to
right with the rightmost position containing
a sign, 0x0D for negative, 0x0C or 0x0F for
positive. A packed decimal field can store
between 1 and 15 digits depending on the
length of the field. If an invalid sign
field is specified, the sort won't produce
what you would expect. Packed decimal values
are only meaningful in fixed length record.
character fields (to 127 bytes) C
Character fields compare up to the first
binary zero in the field, following the C
language conventions for character strings.
upper case character fields (sort fields are U
translated to upper case before compare)
2 byte integers in internal format I
4 byte integers in internal format L
floating point numbers (ieee) F
double precision floating point (ieee) D
zoned decimal numbers N
(Text format numbers, Decimals are allowed)
(LSORTNT now supports scientific notation as)
(well, using E notation, eg. .98 == 9.8E-1)
(xBase N and F fields are sorted as type Z)
1 byte logical fields (dBase II or III) T
User defined field type X X
User defined field type Y Y
User defined field type Z Z
A zoned decimal number is stored as a character string and may contain
leading and trailing spaces, minus sign, decimal point and digits.
NOTE: zoned decimal numbers and comma delimitted files sort very slowly!
The only reasonable field types for comma delimited files are C or N. LSORT
will accept other field types, but the results are undefined.
LSORTNT will prompt you for all parameters and file names or you may specify
some or all of the parameters on the command line when you invoke the sort.
The maximum record length is 4096 bytes. Files will be sorted in memory if
possible.
Files larger than available memory are sorted in pieces and then merged
together. If you have a floppy only system, you should have LSORTNT on the A
drive and the file to be sorted on the B drive. Place a copy of LSORTNT on an
otherwise empty disk and use as your A drive. You may need a formatted empty
disk for work files on the B drive.
SYNTAX:
LSORTNT [-h | -m] -- will prompt you for all necessary information.
or
LSORTNT [-h | -m] sort specifications--will take the specification
specified and prompt you for any others.
Specify -h if you are using a fixed (hard disk) for your output and
merge files. This will eliminate mount messages. This is the default
for LSORTNT 3.01 and above. Specify -m if you are using mountable disks
(floppy, Bournouli, etc.). This allows you to mount disks to contain
work files and output files.
or
LSORTNT -R -- will restart a sort.
Sort Specifications:
You will be asked to specify either a SORT or MERGE operation.
If you ask for a SORT, you may tell LSORTNT to use either a QUICKSORT or
HEAPSORT for internal sorting. You will also be asked to specify two
devices to hold merge files if any are needed. Merge files may be placed on
floppy disk, hard disk or RAM disk. The specified drive must be large
enough to hold the entire input file. You will be given the opportunity to
change floppy disks if desired before each merge drive is used and before
the output file is written. The program will wait for you to press 'Y'
before proceeding. This is not really a problem for unattended sorting
if you use redirected input or specify all prompts on the command line.
If you specify SORT or MERGE you will be prompted for your input file(s) and
output file as well as the definition of the key fields to be used in the
comparisons. Fields are specified by their starting position and length.
The types of fields have been listed above.
The sort specifications may be entered on the command line in the order
requested by LSORT. Each parameter should be separated from the others with
one or more spaces. You will not be prompted for any specification on the
command line (including requests to change disks).
The sort will ask for the following information in the order shown:
Type of Sort: You may reply:
S -- for QUICKSORT
H -- for HEAPSORT
Merge Drive 1: You may reply with any drive letter, although it is best to
specify a fixed disk (if any).
Merge Drive 2: This should be different from drive 1 if you are using
floppy disks, but should be a fixed disk if you have one.
Name of input file: You may specify any name including drive letter and
path. Specify :X to use a user specified input routine.
Name of output file: See above. Specify :X to use a user specified output
routine.
File Type (Unless you are sorting a dBase file): You may reply F for a
fixed length file (all records are the same length), V for a varying
length file (records must end with CR LF.) or D for comma delimited files.
If you entered 'F' for a fixed file, you will be prompted for the record
length.
You will then be prompted for field definitions. Each field definition has
four parts: starting position (from 1) or starting field (delimited files)
field length (in bytes) (no prompt for delimited files)
field type (See above list of valid types)
sort order (A--Ascending, D--Descending)
In order to work as efficiently as possible, LSORTNT does not check the
starting position of a field against the actual length of a record. If some
field starts past the end of a record (e.g. sort field 1 starts in column 10
but the record is only 8 bytes long), the results will be undefined and most
certainly not what you want. Please be careful.
Enter a '0' for the starting position to end the prompt for field
definitions.
If you are sorting a dBase file, you will see a list of fields.